@extends('layouts.app')

@section('content')
    <section class="content-header">
        <h1>
            用户详情
        </h1>
    </section>
    <div class="content">
        <div class="box box-primary">
            <div class="box-body">
                <div class="row" style="padding-left: 20px">
                    @include('users.show_fields')
                    <a href="{!! route('users.index') !!}" class="btn btn-default">Back</a>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('below_body')
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">优惠券列表</h4>
                </div>

                {!! Form::open(['route' => 'users.addBonus','method'=>'GET']) !!}
                <input type="hidden" name="user_id" value="{{$user->id}}">
                <div class="modal-body">
                    @foreach($bonuses as $bonus)
                        <input type="radio" name="bonus_id" value="{{ $bonus->id }}">  {{ $bonus->name }}<br>
                    @endforeach
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
                {!! Form::close() !!}
            </div>
        </div>
    </div>
@endsection